package factory.base;

import lombok.Data;

import java.util.ArrayList;
import java.util.Arrays;

/**
 * 比萨基类
 *以后使用披萨类的都可以引用此类
 * @author yaojianfeng
 */
@Data
public abstract class BasePizza {

    /**
     * 描述
     */
    public String desc ="披萨基类 一个饼子";
    /**
     * 名字
     */
    public String name;
    /**
     * 面团
     */
    public Dough dough;
    /**
     * 酱料
     */
    public Sauce sauce;
    /**
     * 蔬菜
     */
    public Veggies[] veggies;
    /**
     * 芝士
     */
    public Cheese cheese;
    /**
     * 香肠
     */
    public Pepperoni pepperoni;
    /**
     *
     */
    public Clams clam;
    /**
     * 一套佐料
     */
    public ArrayList topping =new ArrayList<>();

    {
        this.topping.add("孜然");
        this.topping.add("香油");
        this.topping.add("盐");
    }

    public BasePizza(String desc, String name, Dough dough, Sauce sauce, Veggies[] veggies, Cheese cheese, Pepperoni pepperoni, Clams clam, ArrayList<String> topping) {
        this.desc = desc;
        this.name = name;
        this.dough = dough;
        this.sauce = sauce;
        this.veggies = veggies;
        this.cheese = cheese;
        this.pepperoni = pepperoni;
        this.clam = clam;
        this.topping = topping;
    }


    /**
     * 可以重写此方法 给披萨赋值(添加原料)
     */
    public void prepare() {
        System.out.println("准备" + name);
    }

    public BasePizza() {

    }


    public void bake() {
        System.out.println("烘烤25分钟到30分钟");
    }

    public void cut() {
        System.out.println("将"+name+"切片!");
    }

    public void box() {
        System.out.println("把"+name+"装盒子里面");
    }




}
